const express=require('express')
const router= express.Router();
const db=require('../../utils/db')

module.exports = router

router.post('/getlogin',function(req,res,next){
  let mysql=`SELECT *FROM USER`
  db(mysql,  function(err, data) {
    console.log('err', err);
    if (err) {
        return res.json({
            code: 500,
            msg: '查询失败'
        })
    }
    res.json({
      code: 200,
      msg: '查询成功',
      data: data
  })
})
})